import request from "@/utils/request";

export const selectWorkerById = (id) =>{
    return request.get(`/worker/selectById`, {
        params: { id }
    })
}

export const selectWorkerByServiceType = (serviceType) =>{
    return request.get(`/worker/selectByServiceType`, {
        params: { serviceType: serviceType }
    })
}

export const getWorkerByRedis = () =>{
    return request.get('/worker/redis')
}

export const getWorkerList = () =>{
    return request.get('/worker/list')
}
export const deleteWorkerById = (id) =>{
    return request.delete(`/worker/delete/${id}`)
}
export const updateWorker = (worker) =>{
    return request.post('/worker/update', worker)
}
export const addWorker = (worker) =>{
    return request.post('/worker/add', worker)
}

